<!-- //加入socket.io.js前端javascript脚本 -->
<script src='../../node_modules/socket.io-client/socket.io.js'></script>
<script>
	var socket = io.connect('http://localhost:8080');//连接本地8080端口下的socket服务
	socket.emit('msg',{'state':'success'});//发送socket消息，消息名为msg
	socket.on('msg',function(data){//响应服务器端发送的socket的msg消息
		console.log(data);
		if(data.me){
			socket.emit('msg',{connection:'good'});
		}
	});
</script>